package com.yanxu.design02_builder.v3;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025/4/14-2025
 * @Description: 指挥者类
 */
public class Director {
    //申明 builder 类型的变量
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }


    //组装自行车
    public Bike constructBike() {
        builder.buildFrame();
        builder.buildSeat();
        Bike bike = builder.createBike();
        return bike;
    }
}